import { renderIcon } from '@/utils/index';
import { DashboardOutlined } from '@vicons/antd';
import { OptionsSharp } from '@vicons/ionicons5';
import * as ionicons5 from '@vicons/ionicons5';
import * as antd from '@vicons/antd';
//前端路由图标映射表
export const constantRouterIcon = {
  DashboardOutlined: renderIcon(DashboardOutlined),
  OptionsSharp: renderIcon(OptionsSharp),
};

// 全局注册icons组件
export function constantRouterIconAll() {
  const map = new Map();
  for (const [key, component] of Object.entries(ionicons5)) {
    map.set(key, component);
  }
  for (const [key, component] of Object.entries(antd)) {
    map.set(key, component);
  }
  return map;
}
